/**
 * Create by xbh 2020/11/6
 */

/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 * Thanks to: Seamus Leahy for adding deltaX and deltaY
 *
 * Version: 3.0.6
 *
 * Requires: 1.2.2+
 */
/*!
 * jQuery Mousewheel 3.1.12
 *
 * Copyright 2014 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
(function (a) {
    if (typeof define === "function" && define.amd) {
        define(["jquery"], a)
    } else {
        if (typeof exports === "object") {
            module.exports = a
        } else {
            a(jQuery)
        }
    }
}(function (c) {
    var d = ["wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll"],
        k = ("onwheel" in document || document.documentMode >= 9) ? ["wheel"] : ["mousewheel", "DomMouseScroll", "MozMousePixelScroll"],
        h = Array.prototype.slice, j, b;
    if (c.event.fixHooks) {
        for (var e = d.length; e;) {
            c.event.fixHooks[d[--e]] = c.event.mouseHooks
        }
    }
    var f = c.event.special.mousewheel = {
        version: "3.1.12", setup: function () {
            if (this.addEventListener) {
                for (var m = k.length; m;) {
                    this.addEventListener(k[--m], l, false)
                }
            } else {
                this.onmousewheel = l
            }
            c.data(this, "mousewheel-line-height", f.getLineHeight(this));
            c.data(this, "mousewheel-page-height", f.getPageHeight(this))
        }, teardown: function () {
            if (this.removeEventListener) {
                for (var m = k.length; m;) {
                    this.removeEventListener(k[--m], l, false)
                }
            } else {
                this.onmousewheel = null
            }
            c.removeData(this, "mousewheel-line-height");
            c.removeData(this, "mousewheel-page-height")
        }, getLineHeight: function (m) {
            var i = c(m), n = i["offsetParent" in c.fn ? "offsetParent" : "parent"]();
            if (!n.length) {
                n = c("body")
            }
            return parseInt(n.css("fontSize"), 10) || parseInt(i.css("fontSize"), 10) || 16
        }, getPageHeight: function (i) {
            return c(i).height()
        }, settings: {adjustOldDeltas: true, normalizeOffset: true}
    };
    c.fn.extend({
        mousewheel: function (i) {
            return i ? this.bind("mousewheel", i) : this.trigger("mousewheel")
        }, unmousewheel: function (i) {
            return this.unbind("mousewheel", i)
        }
    });

    function l(i) {
        var o = i || window.event, u = h.call(arguments, 1), w = 0, q = 0, p = 0, t = 0, s = 0, r = 0;
        i = c.event.fix(o);
        i.type = "mousewheel";
        if ("detail" in o) {
            p = o.detail * -1
        }
        if ("wheelDelta" in o) {
            p = o.wheelDelta
        }
        if ("wheelDeltaY" in o) {
            p = o.wheelDeltaY
        }
        if ("wheelDeltaX" in o) {
            q = o.wheelDeltaX * -1
        }
        if ("axis" in o && o.axis === o.HORIZONTAL_AXIS) {
            q = p * -1;
            p = 0
        }
        w = p === 0 ? q : p;
        if ("deltaY" in o) {
            p = o.deltaY * -1;
            w = p
        }
        if ("deltaX" in o) {
            q = o.deltaX;
            if (p === 0) {
                w = q * -1
            }
        }
        if (p === 0 && q === 0) {
            return
        }
        if (o.deltaMode === 1) {
            var v = c.data(this, "mousewheel-line-height");
            w *= v;
            p *= v;
            q *= v
        } else {
            if (o.deltaMode === 2) {
                var n = c.data(this, "mousewheel-page-height");
                w *= n;
                p *= n;
                q *= n
            }
        }
        t = Math.max(Math.abs(p), Math.abs(q));
        if (!b || t < b) {
            b = t;
            if (a(o, t)) {
                b /= 40
            }
        }
        if (a(o, t)) {
            w /= 40;
            q /= 40;
            p /= 40
        }
        w = Math[w >= 1 ? "floor" : "ceil"](w / b);
        q = Math[q >= 1 ? "floor" : "ceil"](q / b);
        p = Math[p >= 1 ? "floor" : "ceil"](p / b);
        if (f.settings.normalizeOffset && this.getBoundingClientRect) {
            var m = this.getBoundingClientRect();
            s = i.clientX - m.left;
            r = i.clientY - m.top
        }
        i.deltaX = q;
        i.deltaY = p;
        i.deltaFactor = b;
        i.offsetX = s;
        i.offsetY = r;
        i.deltaMode = 0;
        u.unshift(i, w, q, p);
        if (j) {
            clearTimeout(j)
        }
        j = setTimeout(g, 200);
        return (c.event.dispatch || c.event.handle).apply(this, u)
    }

    function g() {
        b = null
    }

    function a(m, i) {
        return f.settings.adjustOldDeltas && m.type === "mousewheel" && i % 120 === 0
    }
}));
if (window.M && typeof window.M.define == "function") {
    window.M.define("jq-mousewheel", function () {
        return jQuery
    })
}
M.define("ScrollBar", function (a) {
    a("jq-mousewheel");
    var c = 15;

    function b(d) {
        this.wrap = null;
        this.container = null;
        this.dir = 1;
        this.barTPL = '<div style="position:absolute; top:0; right:0; padding:1px"><div style="width:7px; height:100%; background:#bbb"></div></div>';
        this.maxHeight = 0;
        M.mix(this, d);
        this.container = $(this.container);
        this.wrap = $(this.wrap);
        this.scrollBar = null;
        this.stopped = false;
        this.scrollToEnd = false;
        this.init()
    }

    b.prototype = {
        init: function () {
            if (!this.container.length) {
                M.error("ScrollBar init failed for no scroll container.");
                return false
            }
            this.posDir = this.dir === 0 ? "left" : "top";
            this.lengthDir = this.dir === 0 ? "width" : "height";
            this.scrollScale = this.dir === 0 ? "scrollWidth" : "scrollHeight";
            this.clientScale = this.dir === 0 ? "clientWidth" : "clientHeight";
            this.scrollDir = this.dir === 0 ? "scrollLeft" : "scrollTop";
            this.initWrap();
            this.bindEvents();
            this.setted = false
        }, initWrap: function () {
            this.container.css({position: "relative"});
            if (this.dir == 1) {
                this.container.css({"overflow-y": "hidden"})
            } else {
                this.container.css({"overflow-x": "hidden"})
            }
            if (this.maxHeight && !isNaN(this.maxHeight)) {
                this.container.css("max-" + this.lengthDir, this.maxHeight).addClass("maxh")
            }
            if (!this.wrap.length) {
                this.container.wrap('<div style="position:relative"></div>');
                this.wrap = this.container.parent()
            } else {
                if (this.wrap.css("position") == "static") {
                    this.wrap.css("position", "relative")
                }
            }
            this.createScrollBar();
            if (this.container.height() > 0) {
                this.setScrollBar()
            }
        }, createScrollBar: function () {
            this.container[0][this.scrollDir] = 0;
            this.scrollBar = $(this.barTPL).css("opacity", 0).appendTo(this.wrap)
        }, bindEvents: function () {
            this.wrap.bind("mouseenter", $.proxy(this.enterWrap, this)).bind("mouseleave", $.proxy(this.leaveWrap, this)).mousewheel($.proxy(this.rollWrap, this));
            this.scrollBar.mousedown($.proxy(this.holdBar, this));
            M.Event(this).on("contentchange", $.proxy(this.checkShowScrollBar, this))
        }, setScrollBar: function () {
            this.checkShowScrollBar()
        }, setDimension: function () {
            this.wrapStart = this.wrap.offset()[this.posDir]
        }, checkShowScrollBar: function () {
            var e = this.container[0];
            this.wrap.css("height", this.container.height());
            this.wrapLength = this.dir === 0 ? this.wrap.width() : this.wrap.height();
            this.scrollLength = this.dir === 0 ? e.scrollWidth : e.scrollHeight;
            this.clientLength = this.dir === 0 ? e.clientWidth : e.clientHeight;
            var d = e[this.scrollDir];
            if (this.scrollLength > this.clientLength) {
                this.updateScrollBarLength();
                this.scrollBar.show();
                if (d <= this.scrollLength - this.clientLength) {
                    this.scroll(d)
                } else {
                    this.scroll(this.scrollLength - this.clientLength)
                }
            } else {
                this.scrollBar.hide()
            }
        }, updateScrollBarLength: function () {
            this.barLength = this.wrapLength * (this.clientLength / this.scrollLength);
            this.barLength = this.barLength < c ? c : this.barLength;
            this.scrollBar.css((this.dir === 0 ? "width" : "height"), this.barLength);
            this.barLength = this.dir === 0 ? this.scrollBar.outerWidth() : this.scrollBar.outerHeight()
        }, enterWrap: function () {
            if (!this.setted) {
                this.setScrollBar();
                this.setted = true
            }
            this.on = true;
            this.setDimension();
            this.scrollBar.stop(true, true).animate({opacity: 0.8}, 300)
        }, leaveWrap: function () {
            this.on = false;
            if (!this.holded) {
                this.scrollBar.stop(true, true).animate({opacity: 0}, 300)
            }
        }, stop: function () {
            this.stopped = true
        }, start: function () {
            this.stopped = false
        }, rollWrap: function (f, h) {
            if (this.stopped) {
                return true
            }
            var d = this.getScrollUnit(-h * f.deltaFactor);
            d = d < 0 ? Math.floor(d) : Math.ceil(d);
            var g = 0, e = this.container[0][this.scrollDir];
            if (e + d < 0) {
                g = 0
            } else {
                if (e + d + this.clientLength > this.scrollLength) {
                    g = this.scrollLength - this.clientLength
                } else {
                    g = e + d
                }
            }
            this.scroll(g);
            if (this.scrollBar.is(":visible")) {
                f.preventDefault();
                f.stopPropagation()
            }
        }, getScrollUnit: function (d) {
            if ($.browser.msie && parseInt($.browser.version, 10) < 9) {
                d = 30 * d
            }
            return d
        }, holdBar: function (d) {
            this.holded = true;
            this.cursorPosition = this.dir === 0 ? d.clientX : d.clientY;
            this.startCursorOffset = this.cursorPosition - this.scrollBar.offset()[this.posDir];
            this.listenMouseMove();
            d.preventDefault()
        }, listenMouseMove: function () {
            $(document).bind("mousemove", this.getMoveCursorHandler()).bind("mouseup", this.getReleaseCursorHandler())
        }, stopListenMouseMove: function () {
            $(document).unbind("mousemove", this.getMoveCursorHandler()).unbind("mouseup", this.getReleaseCursorHandler())
        }, getMoveCursorHandler: function () {
            if (!this.moveCursorHandler) {
                this.moveCursorHandler = $.proxy(this.moveCursor, this)
            }
            return this.moveCursorHandler
        }, getReleaseCursorHandler: function () {
            if (!this.releaseCursorHandler) {
                this.releaseCursorHandler = $.proxy(this.releaseCursor, this)
            }
            return this.releaseCursorHandler
        }, moveCursor: function (i) {
            if (this.holded) {
                var e = this.dir === 0 ? i.clientX : i.clientY, h = e - this.cursorPosition,
                    j = this.cursorPosition - this.startCursorOffset - this.wrapStart,
                    g = e - this.startCursorOffset - this.wrapStart,
                    d = this.cursorPosition + (this.barLength - this.startCursorOffset) - this.wrapStart - this.wrapLength,
                    f = e + (this.barLength - this.startCursorOffset) - this.wrapStart - this.wrapLength;
                if (g > 0 && f < 0 && h !== 0) {
                    this.cursorPosition = e;
                    this.moveScrollBar(h)
                } else {
                    if (g <= 0 && j > 0 && h !== 0) {
                        h = -j;
                        this.cursorPosition = this.cursorPosition + h;
                        this.moveScrollBar(h)
                    } else {
                        if (f >= 0 && d < 0 && h !== 0) {
                            h = -d;
                            this.cursorPosition = this.cursorPosition + h;
                            this.moveScrollBar(h)
                        }
                    }
                }
            }
            i.preventDefault()
        }, moveScrollBar: function (e) {
            var f = parseInt(this.scrollBar.css(this.posDir), 10), d = this.wrapLength - this.barLength - f;
            if (e < 0 && e > -f || e > 0 && e < d) {
                f = f + e
            } else {
                if (e < 0) {
                    f = 0
                } else {
                    if (e > 0) {
                        f = f + d
                    }
                }
            }
            this.scroll((f / (this.wrapLength - this.barLength)) * (this.scrollLength - this.clientLength))
        }, scroll: function (d) {
            this.scrollBar.css(this.posDir, d * (this.wrapLength - this.barLength) / (this.scrollLength - this.clientLength));
            this.container[0][this.scrollDir] = d;
            M.Event(this).fire("scroll");
            if (d === 0) {
                M.Event(this).fire("scrollToTop");
                this.scrollToEnd = true
            } else {
                if (d + this.container[0][this.clientScale] >= this.container[0][this.scrollScale]) {
                    M.Event(this).fire("scrollToBottom");
                    this.scrollToEnd = true
                } else {
                    this.scrollToEnd = false
                }
            }
        }, scrollLength: function () {
            return this.container[0][this.scrollDir]
        }, releaseCursor: function () {
            this.holded = false;
            this.stopListenMouseMove();
            if (!this.on) {
                this.scrollBar.stop(true, true).animate({opacity: 0}, 300)
            }
        }
    };
    return b
});
M.define("Cookie", function (f, h, e) {
    var g = /\+/g;
    var i = navigator.cookieEnabled;
    if (!i) {
        document.cookie = "__detectCookieEnabled=1;";
        i = document.cookie.indexOf("__detectCookieEnabled") != -1 ? true : false;
        if (i) {
            document.cookie = "__detectCookieEnabled=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"
        }
    }
    if (!i) {
        return {isSupport: false}
    }
    var d = {
        isSupport: true, set: function (m, n, k) {
            k = (typeof k == "object" && k !== null) ? k : {};
            if (typeof k.expires === "number") {
                var o = k.expires, l = k.expires = new Date();
                l.setTime(+l + o * 1000)
            }
            return (document.cookie = [j(m), "=", j(String(n)), k.expires ? "; expires=" + k.expires.toUTCString() : "", k.path ? "; path=" + k.path : "", k.domain ? "; domain=" + k.domain : "", k.secure ? "; secure" : ""].join(""))
        }, get: function (q) {
            var k = q ? undefined : {};
            var r = document.cookie ? document.cookie.split("; ") : [];
            for (var p = 0, m = r.length; p < m; p++) {
                var s = r[p].split("=");
                var n = a(s.shift());
                var o = s.join("=");
                if (q && q === n) {
                    k = b(o);
                    break
                }
                if (!q && (o = b(o)) !== undefined) {
                    k[n] = o
                }
            }
            return k
        }, remove: function (l, k) {
            if (this.get(l) === undefined) {
                return false
            }
            k = (typeof k == "object" && k !== null) ? k : {};
            k.expires = -1;
            this.set(l, "", k)
        }
    };

    function j(k) {
        return encodeURIComponent(k)
    }

    function a(k) {
        return decodeURIComponent(k)
    }

    function c(k) {
        if (k.indexOf('"') === 0) {
            k = k.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\")
        }
        try {
            k = decodeURIComponent(k.replace(g, " "));
            return k
        } catch (l) {
        }
    }

    function b(k) {
        var l = c(k);
        return l
    }

    e.exports = d
});
M.define("Storage", function (e, g, b) {
    var n = document;
    var d = c();
    var f = {
        _element: null, _expires: null, _file: document.location.hostname, init: function () {
            if (!this._element) {
                try {
                    this._element = n.createElement("input");
                    this._element.type = "hidden";
                    this._element.addBehavior("#default#userData");
                    n.body.appendChild(this._element);
                    this.setItem("__detectUserDataStorage", 1);
                    this.removeItem("__detectUserDataStorage");
                    return {setItem: this.setItem, getItem: this.getItem, removeItem: this.removeItem}
                } catch (p) {
                    M.error(p)
                }
            }
            return true
        }, setItem: function (s, t, q) {
            var p = j(q);
            this._element.expires = p.toUTCString();
            this._element.load(this._file);
            var r = a(this._element.getAttribute(s)), u = i(t, +p);
            this._element.setAttribute(s, u);
            this._element.save(this._file);
            k({key: s, newValue: u, oldValue: r, url: window.location.href})
        }, getItem: function (p) {
            this._element.load(this._file);
            var q = a(this._element.getAttribute(p));
            return q && q.value
        }, removeItem: function (p) {
            this._element.load(this._file);
            this._element.removeAttribute(p);
            this._element.save(this._file)
        }
    };
    var l = {
        setItem: function (r, s, q) {
            if (!d) {
                return
            }
            var p = j(q);
            localStorage.setItem(r, i(s, +p))
        }, getItem: function (p) {
            if (!d) {
                return
            }
            var r = +new Date(), q = a(localStorage.getItem(p));
            if (q) {
                if (r > q.timestamp) {
                    localStorage.removeItem(p);
                    q = null
                } else {
                    q = q.value
                }
            }
            return q
        }, removeItem: function (p) {
            if (!d) {
                return
            }
            localStorage.removeItem(p)
        }
    };
    var h = {}, m = {
        on: function (q, r) {
            var p = h[q] || (h[q] = []);
            p.push(r)
        }, off: function (q, r) {
            var p = h[q];
            if (!!p) {
                if (!!r) {
                    M.forEach(p, function (t, s) {
                        if (t == r) {
                            p.splice(s, 1)
                        }
                    })
                } else {
                    p = []
                }
            }
            return this
        }
    };
    M.mix(f, m);
    M.mix(l, m);
    if (window.addEventListener) {
        window.addEventListener("storage", k, false)
    } else {
        if (window.attachEvent) {
            window.attachEvent("onstorage", k)
        }
    }

    function k(u) {
        if (!u) {
            u = window.event
        }
        var p = M.mix({}, u), w = u.newValue && a(u.newValue), q = u.oldValue && a(u.oldValue), v = +new Date();
        p.newValue = w && w.value;
        if (!!q && v < q.timestamp) {
            p.oldValue = q.value
        } else {
            p.oldValue = null
        }
        var t = u.key, s = h[t], r = 0;
        if (!t || !s || 0 === s.length) {
            return
        }
        while (r < s.length) {
            s[r++].call(window, p)
        }
    }

    function j(p) {
        if (Object.prototype.toString.call(p) != "[object Date]") {
            var q = typeof p === "number" && p > 0 ? p : 86400;
            p = new Date();
            p.setTime(+p + q * 1000)
        }
        return p
    }

    function i(q, p) {
        var r = {value: q, timestamp: p};
        return JSON.stringify(r)
    }

    function a(p) {
        if (p) {
            try {
                p = JSON.parse(p);
                if (!("value" in p) || !("timestamp" in p)) {
                    p = {value: p, timestamp: +j()}
                }
            } catch (q) {
                p = {value: p, timestamp: +j()}
            }
        }
        return p
    }

    function c() {
        if (window.localStorage) {
            try {
                localStorage.setItem("__detectLocalStorage", 1);
                localStorage.removeItem("__detectLocalStorage");
                return true
            } catch (p) {
                return false
            }
        }
        return false
    }

    var o = window.localStorage ? l : f.init();
    b.exports = M.mix(o, {isAvailable: c, isSupport: window.localStorage ? d : ("setItem" in o)})
});
var XDate = (function (X, D, ae, s) {
    var N = 0;
    var h = 1;
    var n = 2;
    var l = 3;
    var t = 4;
    var aa = 5;
    var d = 6;
    var ah = 7;
    var G = 8;
    var C = 9;
    var ab = 86400000;
    var T = "yyyy-MM-dd'T'HH:mm:ss(.fff)";
    var u = T + "zzz";
    var i = ["FullYear", "Month", "Date", "Hours", "Minutes", "Seconds", "Milliseconds", "Day", "Year"];
    var m = ["Years", "Months", "Days"];
    var x = [12, 31, 24, 60, 60, 1000, 1];
    var z = new RegExp("(([a-zA-Z])\\2*)|(\\((('.*?'|\\(.*?\\)|.)*?)\\))|('(.*?)')");
    var b = X.UTC;
    var B = X.prototype.toUTCString;
    var r = S.prototype;
    r.length = 1;
    r.splice = ae.prototype.splice;

    function S() {
        return ad((this instanceof S) ? this : new S(), arguments)
    }

    function ad(an, am) {
        var ak = am.length;
        var al;
        if (R(am[ak - 1])) {
            al = am[--ak];
            am = w(am, 0, ak)
        }
        if (!ak) {
            an[0] = new X()
        } else {
            if (ak == 1) {
                var aj = am[0];
                if (aj instanceof X || ag(aj)) {
                    an[0] = new X(+aj)
                } else {
                    if (aj instanceof S) {
                        an[0] = E(aj)
                    } else {
                        if (k(aj)) {
                            an[0] = new X(0);
                            an = y(aj, al || false, an)
                        }
                    }
                }
            } else {
                an[0] = new X(b.apply(X, am));
                if (!al) {
                    an[0] = e(an[0])
                }
            }
        }
        if (R(al)) {
            q(an, al)
        }
        return an
    }

    r.getUTCMode = af(W);

    function W(aj) {
        return aj[0].toString === B
    }

    r.setUTCMode = af(q);

    function q(ak, aj, al) {
        if (aj) {
            if (!W(ak)) {
                if (al) {
                    ak[0] = j(ak[0])
                }
                ak[0].toString = B
            }
        } else {
            if (W(ak)) {
                if (al) {
                    ak[0] = e(ak[0])
                } else {
                    ak[0] = new X(+ak[0])
                }
            }
        }
        return ak
    }

    r.getTimezoneOffset = function () {
        if (W(this)) {
            return 0
        } else {
            return this[0].getTimezoneOffset()
        }
    };
    ac(i, function (ak, aj) {
        r["get" + ak] = function () {
            return P(this[0], W(this), aj)
        };
        if (aj != G) {
            r["getUTC" + ak] = function () {
                return P(this[0], true, aj)
            }
        }
        if (aj != ah) {
            r["set" + ak] = function (al) {
                H(this, aj, al, arguments, W(this));
                return this
            };
            if (aj != G) {
                r["setUTC" + ak] = function (al) {
                    H(this, aj, al, arguments, true);
                    return this
                };
                r["add" + (m[aj] || ak)] = function (am, al) {
                    f(this, aj, am, al);
                    return this
                };
                r["diff" + (m[aj] || ak)] = function (al) {
                    return I(this, al, aj)
                }
            }
        }
    });

    function H(an, aq, ao, am, ap) {
        var ak = o(P, an[0], ap);
        var aj = o(J, an[0], ap);
        var ar;
        var al = false;
        if (am.length == 2 && R(am[1])) {
            al = am[1];
            am = [ao]
        }
        if (aq == h) {
            ar = (ao % 12 + 12) % 12
        } else {
            ar = ak(h)
        }
        aj(aq, am);
        if (al && ak(h) != ar) {
            aj(h, [ak(h) - 1]);
            aj(n, [O(ak(N), ak(h))])
        }
    }

    function f(al, ak, an, aj) {
        an = Number(an);
        var am = D.floor(an);
        al["set" + i[ak]](al["get" + i[ak]]() + am, aj || false);
        if (am != an && ak < d) {
            f(al, ak + 1, (an - am) * x[ak], aj)
        }
    }

    function I(aj, aq, am) {
        aj = aj.clone().setUTCMode(true, true);
        aq = S(aq).setUTCMode(true, true);
        var al = 0;
        if (am == N || am == h) {
            for (var ao = d, ak; ao >= am; ao--) {
                al /= x[ao];
                al += P(aq, false, ao) - P(aj, false, ao)
            }
            if (am == h) {
                al += (aq.getFullYear() - aj.getFullYear()) * 12
            }
        } else {
            if (am == n) {
                var ap = aj.toDate().setUTCHours(0, 0, 0, 0);
                var an = aq.toDate().setUTCHours(0, 0, 0, 0);
                al = D.round((an - ap) / ab) + ((aq - an) - (aj - ap)) / ab
            } else {
                al = (aq - aj) / [3600000, 60000, 1000, 1][am - 3]
            }
        }
        return al
    }

    r.getWeek = function () {
        return a(o(P, this, false))
    };
    r.getUTCWeek = function () {
        return a(o(P, this, true))
    };
    r.setWeek = function (ak, aj) {
        c(this, ak, aj, false);
        return this
    };
    r.setUTCWeek = function (ak, aj) {
        c(this, ak, aj, true);
        return this
    };
    r.addWeeks = function (aj) {
        return this.addDays(Number(aj) * 7)
    };
    r.diffWeeks = function (aj) {
        return I(this, aj, n) / 7
    };

    function a(aj) {
        return K(aj(N), aj(h), aj(n))
    }

    function K(ak, am, aj) {
        var an = new X(b(ak, am, aj));
        var al = U(p(ak, am, aj));
        return D.floor(D.round((an - al) / ab) / 7) + 1
    }

    function p(ak, al, aj) {
        var am = new X(b(ak, al, aj));
        if (am < U(ak)) {
            return ak - 1
        } else {
            if (am >= U(ak + 1)) {
                return ak + 1
            }
        }
        return ak
    }

    function U(aj) {
        var ak = new X(b(aj, 0, 4));
        ak.setUTCDate(ak.getUTCDate() - (ak.getUTCDay() + 6) % 7);
        return ak
    }

    function c(am, ap, ak, ao) {
        var aj = o(P, am, ao);
        var an = o(J, am, ao);
        if (ak === s) {
            ak = p(aj(N), aj(h), aj(n))
        }
        var al = U(ak);
        if (!ao) {
            al = e(al)
        }
        am.setTime(+al);
        an(n, [aj(n) + (ap - 1) * 7])
    }

    S.parsers = [F];
    S.parse = function (aj) {
        return +S("" + aj)
    };

    function y(ao, aj, an) {
        var am = S.parsers;
        var al = 0;
        var ak;
        for (; al < am.length; al++) {
            ak = am[al](ao, aj, an);
            if (ak) {
                return ak
            }
        }
        an[0] = new X(ao);
        return an
    }

    function F(an, ak, al) {
        var aj = an.match(/^(\d{4})(-(\d{2})(-(\d{2})([T ](\d{2}):(\d{2})(:(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/);
        if (aj) {
            var am = new X(b(aj[1], aj[3] ? aj[3] - 1 : 0, aj[5] || 1, aj[7] || 0, aj[8] || 0, aj[10] || 0, aj[12] ? Number("0." + aj[12]) * 1000 : 0));
            if (aj[13]) {
                if (aj[14]) {
                    am.setUTCMinutes(am.getUTCMinutes() + (aj[15] == "-" ? 1 : -1) * (Number(aj[16]) * 60 + (aj[18] ? Number(aj[18]) : 0)))
                }
            } else {
                if (!ak) {
                    am = e(am)
                }
            }
            return al.setTime(+am)
        }
    }

    r.toString = function (aj, ak, al) {
        if (aj === s || !V(this)) {
            return this[0].toString()
        } else {
            return L(this, aj, ak, al, W(this))
        }
    };
    r.toUTCString = r.toGMTString = function (aj, ak, al) {
        if (aj === s || !V(this)) {
            return this[0].toUTCString()
        } else {
            return L(this, aj, ak, al, true)
        }
    };
    r.toISOString = function () {
        return this.toUTCString(u)
    };
    S.defaultLocale = "";
    S.locales = {
        "": {
            monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
            monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
            dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
            dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
            amDesignator: "AM",
            pmDesignator: "PM"
        }
    };
    S.formatters = {i: T, u: u};

    function L(aq, am, ak, an, ar) {
        var aj = S.locales;
        var ap = aj[S.defaultLocale] || {};
        var al = o(P, aq, ar);
        ak = (k(ak) ? aj[ak] : ak) || {};

        function at(au) {
            return ak[au] || ap[au]
        }

        function ao(au) {
            if (an) {
                var av = (au == ah ? n : au) - 1;
                for (; av >= 0; av--) {
                    an.push(al(av))
                }
            }
            return al(au)
        }

        return Y(aq, am, ao, at, ar)
    }

    function Y(ap, ak, an, ao, aq) {
        var aj;
        var al;
        var am = "";
        while (aj = ak.match(z)) {
            am += ak.substr(0, aj.index);
            if (aj[1]) {
                am += Q(ap, aj[1], an, ao, aq)
            } else {
                if (aj[3]) {
                    al = Y(ap, aj[4], an, ao, aq);
                    if (parseInt(al.replace(/\D/g, ""), 10)) {
                        am += al
                    }
                } else {
                    am += aj[7] || "'"
                }
            }
            ak = ak.substr(aj.index + aj[0].length)
        }
        return am + ak
    }

    function Q(ap, an, al, ao, aq) {
        var aj = an.length;
        var am;
        var ak = "";
        while (aj > 0) {
            am = A(ap, an.substr(0, aj), al, ao, aq);
            if (am !== s) {
                ak += am;
                an = an.substr(aj);
                aj = an.length
            } else {
                aj--
            }
        }
        return ak + an
    }

    function A(an, al, aj, am, ap) {
        var ak = S.formatters[al];
        if (k(ak)) {
            return Y(an, ak, aj, am, ap)
        } else {
            if (v(ak)) {
                return ak(an, ap || false, am)
            }
        }
        switch (al) {
            case"fff":
                return Z(aj(d), 3);
            case"s":
                return aj(aa);
            case"ss":
                return Z(aj(aa));
            case"m":
                return aj(t);
            case"mm":
                return Z(aj(t));
            case"h":
                return aj(l) % 12 || 12;
            case"hh":
                return Z(aj(l) % 12 || 12);
            case"H":
                return aj(l);
            case"HH":
                return Z(aj(l));
            case"d":
                return aj(n);
            case"dd":
                return Z(aj(n));
            case"ddd":
                return am("dayNamesShort")[aj(ah)] || "";
            case"dddd":
                return am("dayNames")[aj(ah)] || "";
            case"M":
                return aj(h) + 1;
            case"MM":
                return Z(aj(h) + 1);
            case"MMM":
                return am("monthNamesShort")[aj(h)] || "";
            case"MMMM":
                return am("monthNames")[aj(h)] || "";
            case"yy":
                return (aj(N) + "").substring(2);
            case"yyyy":
                return aj(N);
            case"t":
                return ai(aj, am).substr(0, 1).toLowerCase();
            case"tt":
                return ai(aj, am).toLowerCase();
            case"T":
                return ai(aj, am).substr(0, 1);
            case"TT":
                return ai(aj, am);
            case"z":
            case"zz":
            case"zzz":
                return ap ? "Z" : g(an, al);
            case"w":
                return a(aj);
            case"ww":
                return Z(a(aj));
            case"S":
                var ao = aj(n);
                if (ao > 10 && ao < 20) {
                    return "th"
                }
                return ["st", "nd", "rd"][ao % 10 - 1] || "th"
        }
    }

    function g(ao, an) {
        var ap = ao.getTimezoneOffset();
        var ak = ap < 0 ? "+" : "-";
        var aj = D.floor(D.abs(ap) / 60);
        var am = D.abs(ap) % 60;
        var al = aj;
        if (an == "zz") {
            al = Z(aj)
        } else {
            if (an == "zzz") {
                al = Z(aj) + ":" + Z(am)
            }
        }
        return ak + al
    }

    function ai(aj, ak) {
        return aj(l) < 12 ? ak("amDesignator") : ak("pmDesignator")
    }

    ac(["getTime", "valueOf", "toDateString", "toTimeString", "toLocaleString", "toLocaleDateString", "toLocaleTimeString", "toJSON"], function (aj) {
        r[aj] = function () {
            return this[0][aj]()
        }
    });
    r.setTime = function (aj) {
        this[0].setTime(aj);
        return this
    };
    r.valid = af(V);

    function V(aj) {
        return !isNaN(+aj[0])
    }

    r.clone = function () {
        return new S(this)
    };
    r.clearTime = function () {
        return this.setHours(0, 0, 0, 0)
    };
    r.toDate = function () {
        return new X(+this[0])
    };
    S.now = function () {
        return +new X()
    };
    S.today = function () {
        return new S().clearTime()
    };
    S.UTC = b;
    S.getDaysInMonth = O;

    function E(aj) {
        var ak = new X(+aj[0]);
        if (W(aj)) {
            ak.toString = B
        }
        return ak
    }

    function P(ak, al, aj) {
        return ak["get" + (al ? "UTC" : "") + i[aj]]()
    }

    function J(al, am, ak, aj) {
        al["set" + (am ? "UTC" : "") + i[ak]].apply(al, aj)
    }

    function j(aj) {
        return new X(b(aj.getFullYear(), aj.getMonth(), aj.getDate(), aj.getHours(), aj.getMinutes(), aj.getSeconds(), aj.getMilliseconds()))
    }

    function e(aj) {
        return new X(aj.getUTCFullYear(), aj.getUTCMonth(), aj.getUTCDate(), aj.getUTCHours(), aj.getUTCMinutes(), aj.getUTCSeconds(), aj.getUTCMilliseconds())
    }

    function O(aj, ak) {
        return 32 - new X(b(aj, ak, 32)).getUTCDate()
    }

    function af(aj) {
        return function () {
            return aj.apply(s, [this].concat(w(arguments)))
        }
    }

    function o(ak) {
        var aj = w(arguments, 1);
        return function () {
            return ak.apply(s, aj.concat(w(arguments)))
        }
    }

    function w(ak, al, aj) {
        return ae.prototype.slice.call(ak, al || 0, aj === s ? ak.length : aj)
    }

    function ac(aj, al) {
        for (var ak = 0; ak < aj.length; ak++) {
            al(aj[ak], ak)
        }
    }

    function k(aj) {
        return typeof aj == "string"
    }

    function ag(aj) {
        return typeof aj == "number"
    }

    function R(aj) {
        return typeof aj == "boolean"
    }

    function v(aj) {
        return typeof aj == "function"
    }

    function Z(ak, aj) {
        aj = aj || 2;
        ak += "";
        while (ak.length < aj) {
            ak = "0" + ak
        }
        return ak
    }

    if (typeof module !== "undefined" && module.exports) {
        module.exports = S
    }
    if (typeof define === "function" && define.amd) {
        define([], function () {
            return S
        })
    } else {
        if (window.M && typeof window.M.define === "function") {
            window.M.define("xdate", function () {
                return S
            })
        }
    }
    return S
})(Date, Math, Array);
M.define("dialog/Layer", function (a) {
    var g = 0, f = 550, d = (function () {
        return $.browser && $.browser.msie && parseInt($.browser.version, 10) == 7
    }()), c = (function () {
        return $.browser && $.browser.msie && parseInt($.browser.version, 10) < 7
    }());

    function b() {
        return g++
    }

    function e(h) {
        this.opacity = 0.8;
        this.background = "#fff";
        this.impl = "Dialog";
        this.fixed = true;
        M.mix(this, h);
        this.id = "_j_layer_" + b();
        this.stacks = [];
        this.activeStackId = null;
        this.overflow = false;
        this.changeFixed = false;
        e.instances[this.id] = this;
        if (!e[this.impl]) {
            e[this.impl] = []
        }
        e[this.impl].push(this.id);
        this.init()
    }

    e.prototype = {
        init: function () {
            this._createPanel()
        }, _createPanel: function () {
            f++;
            var h = {
                position: (!c && this.fixed) ? "fixed" : "absolute",
                width: "100%",
                height: "100%",
                top: 0,
                left: 0
            }, j = M.mix({}, h, {"z-index": f, display: "none"}), k = M.mix({}, h, {
                position: !c ? "fixed" : "absolute",
                background: this.background,
                opacity: this.opacity,
                "z-index": -1
            }), i = M.mix({}, h, {"z-index": 0}, (!c && this.fixed) ? {
                "overflow-x": "hidden",
                "overflow-y": "hidden"
            } : {overflow: "visible"});
            this._panel = $('<div id="' + this.id + '" class="layer _j_layer">                                <div class="layer_mask _j_mask"></div>                                <div class="layer_content _j_content"></div>                            </div>').css(j).appendTo("body");
            this._mask = this._panel.children("._j_mask").css(k);
            this._content = this._panel.children("._j_content").css(i)
        }, setZIndex: function (h) {
            f = h;
            this._panel.css("z-index", f)
        }, getZIndex: function () {
            return +this._panel.css("z-index")
        }, toFront: function () {
            this.setZIndex(f + 1)
        }, setFixed: function (h) {
            h = !!h;
            if (this.fixed != h) {
                this.changeFixed = true;
                this.fixed = h;
                if (!c && this.fixed) {
                    this._panel.css("position", "fixed");
                    this._content.css({position: "fixed", "overflow-x": "hidden", "overflow-y": "hidden"})
                } else {
                    this._panel.css("position", "absolute");
                    this._content.css({position: "absolute", "overflow-x": "", "overflow-y": "", overflow: "visible"})
                }
            } else {
                this.changeFixed = false
            }
        }, newStack: function (i) {
            var h = $(i).appendTo(this._content);
            this.stacks.push(h);
            return this.stacks.length - 1
        }, getStack: function (h) {
            return this.stacks[h]
        }, getActiveStack: function () {
            return this.stacks[this.activeStackId]
        }, setActiveStack: function (h) {
            this.activeStackId = h
        }, getPanel: function () {
            return this._panel
        }, getMask: function () {
            return this._mask
        }, getContent: function () {
            return this._content
        }, show: function (j) {
            var i = this;
            if (this.visible) {
                typeof j === "function" && j();
                return
            }
            e.activeId = this.id;
            this.visible = true;
            if (c) {
                var h = document.documentElement && document.documentElement.scrollHeight || document.body.scrollHeight;
                this._panel.css("height", h);
                this._mask.css("height", h)
            }
            this._panel.fadeIn(200, function () {
                typeof j === "function" && j()
            })
        }, hide: function (i) {
            var h = this;
            if (!this.visible) {
                typeof i === "function" && i();
                return
            }
            this.visible = false;
            if (c) {
                this._panel.css("height", "");
                this._mask.css("height", "")
            }
            this._panel.fadeOut(200, function () {
                typeof i === "function" && i();
                h._recoverTopScroller()
            })
        }, setOverFlow: function (h) {
            this.overflow = h;
            if (h) {
                if (!c && this.fixed) {
                    this._hideTopScroller();
                    this._content.css("overflow-y", "auto")
                }
            } else {
                if (!c && this.fixed) {
                    this._content.css("overflow-y", "hidden")
                }
            }
        }, _hideTopScroller: function () {
            if (d) {
                $("html").css("overflow", "hidden")
            } else {
                if (!c) {
                    $("body").css("overflow", "hidden")
                } else {
                    $("body").css("overflow-x", "hidden");
                    this._panel.height($(document).height() + 20)
                }
            }
        }, _recoverTopScroller: function () {
            if (d) {
                $("html").css("overflow", "")
            } else {
                if (!c) {
                    $("body").css("overflow", "")
                } else {
                    $("body").css("overflow-x", "")
                }
            }
        }, destroy: function () {
            this.hide($.proxy(function () {
                this._panel && this._panel.remove();
                this._panel = null;
                if (M.indexOf(e[this.impl], this.id) != -1) {
                    e[this.impl].splice(M.indexOf(e[this.impl], this.id), 1)
                }
                delete e.instances[this.id]
            }, this))
        }, clear: function () {
            this._content.empty();
            this.stacks = [];
            this.activeStackId = null
        }
    };
    e.instances = {};
    e.activeId = null;
    e.getInstance = function (h) {
        return e.instances[h]
    };
    e.getActive = function (h) {
        var i = e.getInstance(e.activeId);
        if (h && i) {
            i = i.impl === h ? i : null
        }
        return i
    };
    e.getImplInstance = function (i) {
        var h = e.getActive(i);
        if (!h && M.is(e[i], "Array") && e[i].length) {
            h = e.getInstance(e[i][e[i].length - 1])
        }
        return h
    };
    e.closeActive = function () {
        var h = e.getActive();
        if (h && h.getActiveStack()) {
            h.getActiveStack().trigger("close")
        }
    };
    $(document).keyup(function (h) {
        if (h.keyCode == 27) {
            e.closeActive()
        }
    });
    $(document).unload(function () {
        M.forEach(e.instances, function () {
            e.destroy()
        })
    });
    return e
});
M.define("dialog/DialogBase", function (b) {
    var e = b("dialog/Layer"), a = M.Event, d = (function () {
        return $.browser && $.browser.msie && parseInt($.browser.version, 10) < 7
    }());

    function c(f) {
        this.newLayer = false;
        this.width = "";
        this.height = "";
        this.background = "#000";
        this.panelBackground = "#fff";
        this.bgOpacity = 0.7;
        this.stackable = true;
        this.fixed = true;
        this.reposition = false;
        this.autoPosition = true;
        this.minTopOffset = 20;
        this.layerZIndex = -1;
        this.impl = "Dialog";
        M.mix(this, f);
        this.visible = false;
        this.destroyed = false;
        this.positioned = false;
        this.resizeTimer = 0;
        this.init()
    }

    c.prototype = {
        tpl: "<div />", init: function () {
            this._createDialog();
            this._bindEvents()
        }, _createDialog: function () {
            this._panel = $(this.tpl).css({
                position: "absolute",
                opacity: 0,
                display: "none",
                background: this.panelBackground,
                "z-index": 0
            });
            this.setRect({width: this.width, height: this.height});
            this._layer = !this.newLayer && e.getImplInstance(this.impl) || new e({impl: this.impl});
            if (this.layerZIndex >= 0) {
                this._layer.setZIndex(this.layerZIndex)
            }
            this._layer.setFixed(this.fixed);
            this._layer.getMask().css({background: this.background, opacity: this.bgOpacity});
            this._stackId = this._layer.newStack(this._panel);
            this.setPanelContent()
        }, _bindEvents: function () {
            var f = this;
            $(window).resize($.proxy(this.resizePosition, this));
            M.Event(this).on("resize", $.proxy(this.resizePosition, this));
            this._panel.delegate("._j_close, a[data-dialog-button]", "click", function (g) {
                var h = $(g.currentTarget).attr("data-dialog-button");
                if (h == "hide") {
                    f.hide()
                } else {
                    f.close()
                }
                g.preventDefault()
            });
            this._panel.bind("close", function (g, h) {
                f.close(h)
            })
        }, resizePosition: function () {
            var f = this;
            clearTimeout(this.resizeTimer);
            if (f.visible && f.autoPosition) {
                this.resizeTimer = setTimeout(function () {
                    f.setPosition()
                }, 100)
            }
        }, addClass: function (f) {
            this._panel.addClass(f)
        }, removeClass: function (f) {
            this._panel.removeClass(f)
        }, setRect: function (f) {
            if (f.width) {
                this._panel.css("width", f.width);
                this.width = f.width
            }
            if (f.height) {
                this._panel.css("height", f.height);
                this.height = f.height
            }
        }, getPanel: function () {
            return this._panel
        }, getLayer: function () {
            return this._layer
        }, getMask: function () {
            return this._layer && this._layer.getMask()
        }, setPanelContent: function () {
        }, _getPanelRect: function () {
            var f = this.getPanel(), g = f.outerHeight(), h = f.outerWidth();
            if (!f.is(":visible")) {
                f.css({visibility: "hidden", display: "block"});
                var g = f.outerHeight(), h = f.outerWidth();
                f.css({visibility: "", display: ""})
            }
            return {height: g, width: h}
        }, _getNumric: function (f) {
            f = parseInt(f, 10);
            return isNaN(f) ? 0 : f
        }, setPosition: function (f) {
            var g = this._getPanelRect(), h = {width: $(window).width(), height: $(window).height()};
            var k = (h.width - (this._getNumric(this.width) > 0 ? this._getNumric(this.width) : g.width)) / 2,
                j = (h.height - (this._getNumric(this.height) > 0 ? this._getNumric(this.height) : g.height)) * 4 / 9;
            j = j < this.minTopOffset ? this.minTopOffset : j;
            if (d || !this.fixed) {
                var i = $(window).scrollTop();
                if (i > 0) {
                    j += i
                }
            }
            f = {left: (f && f.left) || k, top: (f && f.top) || j};
            if (!d && this.fixed) {
                if (h.height - g.height <= f.top) {
                    this.getPanel().addClass("dialog_overflow");
                    this._layer.setOverFlow(true)
                } else {
                    this.getPanel().removeClass("dialog_overflow");
                    this._layer.setOverFlow(false)
                }
            }
            var l = this.positioned ? "animate" : "css";
            $.fn[l].call(this.getPanel(), f, 200);
            this.positioned = true;
            this.position = f
        }, setFixed: function (f) {
            this.fixed = !!f;
            this._layer.setFixed(this.fixed)
        }, getPosition: function () {
            return this.position
        }, show: function (f) {
            if (this.visible) {
                return
            }
            var h = this;
            a(this).fire("beforeshow");
            var g;
            if (this._layer.getActiveStack()) {
                g = this._layer.getActiveStack();
                if (!this.reposition && !f && !this._layer.changeFixed) {
                    f = this._layer.getActiveStack().position()
                }
            }
            this._layer.show();
            this.getPanel().css({display: "", "z-index": 1});
            this.setPosition(f);
            g && g.trigger("close", [true]);
            this.visible = true;
            this._layer.setActiveStack(this._stackId);
            this.getPanel().animate({opacity: 1}, {
                queue: false, duration: 200, complete: function () {
                    a(h).fire("aftershow")
                }
            })
        }, close: function () {
            var f = this.stackable ? "hide" : "destroy";
            this[f].apply(this, Array.prototype.slice.call(arguments))
        }, hide: function (g, f) {
            if (typeof g == "function") {
                f = g;
                g = undefined
            }
            if (!this.visible) {
                typeof f == "function" && f();
                return
            }
            a(this).fire("beforeclose");
            a(this).fire("beforehide");
            this._layer.setActiveStack(null);
            this.visible = false;
            if (!g) {
                this._layer.hide()
            }
            this.getPanel().animate({opacity: 0}, {
                queue: false, duration: 200, complete: $.proxy(function () {
                    this.getPanel().css({display: "none", "z-index": 0});
                    a(this).fire("afterhide");
                    a(this).fire("afterclose");
                    typeof f == "function" && f()
                }, this)
            })
        }, destroy: function (g, f) {
            if (typeof g == "function") {
                f = g;
                g = undefined
            }
            if (this.destroyed) {
                M.error("Dialog already destroyed!");
                typeof f == "function" && f();
                return
            }
            a(this).fire("beforeclose");
            a(this).fire("beforedestroy");
            this.destroyed = true;
            this.hide(g, $.proxy(function () {
                if (this._panel.length) {
                    this._panel.undelegate();
                    this._panel.unbind();
                    this._panel.remove();
                    this._panel = null
                }
                this._layer = null;
                a(this).fire("afterdestroy");
                a(this).fire("afterclose");
                typeof f == "function" && f()
            }, this))
        }
    };
    return c
});
M.define("dialog/Dialog", function (c) {
    var d = c("dialog/DialogBase"),
        a = '<div class="popup-box layer_dialog _j_dialog pop_no_margin">                    <div class="dialog_title" style="display:none"><div class="_j_title title"></div></div>                    <div class="dialog_body _j_content"></div>                    <a id="popup_close" class="close-btn _j_close"><i></i></a>                </div>';
    var b = M.extend(function (e) {
        this.content = "";
        this.title = "";
        this.PANEL_CLASS = "";
        this.MASK_CLASS = "";
        b.$parent.call(this, e)
    }, d);
    M.mix(b.prototype, {
        tpl: a, setPanelContent: function () {
            this._dialogTitle = this._panel.find("._j_title");
            this._dialogContent = this._panel.find("._j_content");
            this.setTitle(this.title);
            this.setContent(this.content);
            this.addClass(this.PANEL_CLASS);
            this.getMask().addClass(this.MASK_CLASS)
        }, setTitle: function (e) {
            if (e) {
                this._dialogTitle.html(e).parent().css("display", "")
            } else {
                this._dialogTitle.parent().css("display", "none")
            }
            this.title = e
        }, getTitle: function () {
            return this.title
        }, setContent: function (e) {
            this._dialogContent.empty().append(e)
        }
    });
    return b
});
M.define("/im/js/client/ImEventEntity", function (b, a, c) {
    var d = function (i, f, h, g) {
        if (arguments.length > 0) {
            this.e = i
        } else {
            this.e = d.prototype.e
        }
        if (arguments.length > 1) {
            if (!f) {
                this.b = {}
            } else {
                this.b = f
            }
        } else {
            this.b = d.prototype.b
        }
        if (arguments.length > 2) {
            this.t = h
        } else {
            if (!Date.now) {
                Date.now = function () {
                    return new Date().getTime()
                }
            }
            this.t = Date.now() / 1000 >> 0
        }
        if (arguments.length > 3) {
            this.v = g
        } else {
            this.v = d.prototype.v
        }
        this.b.role = {is_c: 1, is_pc: 1}
    };
    d.prototype = {e: "", b: {}, t: 0, v: "1.0"};
    c.exports = d
});
(function () {
    var e = {trident: 0, gecko: 0, webkit: 0, khtml: 0, presto: 0, ver: null};
    var b = {ie: 0, firefox: 0, safari: 0, konq: 0, opera: 0, chrome: 0, ver: null};
    var f = {win: false, mac: false, x11: false};
    var d = navigator.userAgent;
    if (/AppleWebKit\/(\S+)/.test(d)) {
        e.ver = RegExp["$1"];
        e.webkit = parseFloat(e.ver);
        if (/OPR\/(\S+)/.test(d)) {
            b.ver = RegExp["$1"];
            b.opera = parseFloat(b.ver)
        } else {
            if (/Chrome\/(\S+)/.test(d)) {
                b.ver = RegExp["$1"];
                b.chrome = parseFloat(b.ver)
            } else {
                if (/Version\/(\S+)/.test(d)) {
                    b.ver = RegExp["$1"];
                    b.safari = parseFloat(b.ver)
                } else {
                    var a = 1;
                    if (e.webkit < 100) {
                        a = 1
                    } else {
                        if (e.webkit < 312) {
                            a = 1.2
                        } else {
                            if (e.webkit < 412) {
                                a = 1.3
                            } else {
                                a = 2
                            }
                        }
                    }
                    b.safari = b.ver = a
                }
            }
        }
    } else {
        if (window.opera) {
            e.ver = b.ver = window.opera.version();
            e.presto = b.opera = parseFloat(e.ver)
        } else {
            if (/Opera[\/\s](\S+)/.test(d)) {
                e.ver = b.ver = RegExp["$1"];
                e.presto = b.opera = parseFloat(e.ver)
            } else {
                if (/KHTML\/(\S+)/.test(d) || /Konqueror\/([^;]+)/.test(d)) {
                    e.ver = b.ver = RegExp["$1"];
                    e.khtml = b.konq = parseFloat(e.ver)
                } else {
                    if (/rv:([^\)]+)\) Gecko\/\d{8}/.test(d)) {
                        e.ver = RegExp["$1"];
                        e.gecko = parseFloat(e.ver);
                        if (/Firefox\/(\S+)/.test(d)) {
                            b.ver = RegExp["$1"];
                            b.firefox = parseFloat(b.ver)
                        }
                    } else {
                        if (/Trident\/([\d\.]+)/.test(d)) {
                            e.ver = RegExp["$1"];
                            e.trident = parseFloat(e.ver);
                            if (/rv\:([\d\.]+)/.test(d) || /MSIE ([^;]+)/.test(d)) {
                                b.ver = RegExp["$1"];
                                b.ie = parseFloat(b.ver)
                            }
                        } else {
                            if (/MSIE ([^;]+)/.test(d)) {
                                b.ver = RegExp["$1"];
                                b.ie = parseFloat(b.ver);
                                e.ver = b.ie - 4;
                                e.trident = parseFloat(e.ver)
                            }
                        }
                    }
                }
            }
        }
    }
    var g = navigator.platform;
    f.win = g.indexOf("Win") == 0;
    f.mac = g.indexOf("Mac") == 0;
    f.x11 = (g.indexOf("X11") == 0) || (g.indexOf("Linux") == 0);
    if (f.win) {
        if (/Win(?:dows )?([^do]{2})\s?(\d+\.\d+)?/.test(d)) {
            if (RegExp["$1"] == "NT") {
                f.win = ({
                    "5.0": "2000",
                    "5.1": "XP",
                    "6.0": "Vista",
                    "6.1": "7",
                    "6.2": "8",
                    "6.3": "8.1",
                    "10": "10"
                })[RegExp["$2"]] || "NT"
            } else {
                if (RegExp["$1"] == "9x") {
                    f.win = "ME"
                } else {
                    f.win = RegExp["$1"]
                }
            }
        }
    }
    var h = {
        browser: "unknown",
        browser_ver: d,
        engine: "unknown",
        engine_ver: "unknown",
        system: "unknown",
        system_ver: "unknown"
    };
    for (var c in e) {
        if (e.hasOwnProperty(c)) {
            if (c == "ver") {
                if (e[c]) {
                    h.engine_ver = e[c]
                }
            } else {
                if (e[c] !== 0) {
                    h.engine = c
                }
            }
        }
    }
    for (var c in b) {
        if (b.hasOwnProperty(c)) {
            if (c == "ver") {
                if (b[c]) {
                    h.browser_ver = b[c]
                }
            } else {
                if (b[c] !== 0) {
                    h.browser = c
                }
            }
        }
    }
    for (var c in f) {
        if (f.hasOwnProperty(c)) {
            if (f[c]) {
                h.system = c;
                h.system_ver = f[c]
            }
        }
    }
    if (window.mfwPageEvent) {
        window.mfwPageEvent("test", "browser_stat", h);
        if (/\/i\/\d+\.html/.test(window.location.href)) {
            window.mfwPageEvent("test", "note_browser_test", h)
        }
    }
}());